package ar.edu.unicen.exa.isistan.archassis.source;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import ar.edu.unicen.exa.isistan.archassis.diff.IDiffStrategy;
import ar.edu.unicen.exa.isistan.archassis.ia.api.db.JavaClass;
import ar.edu.unicen.exa.isistan.archassis.metadata.ClassResolver;

public class FileSourceStrategy implements ISourceStrategy {
	private File folder;
	public FileSourceStrategy(File folder) {
		this.folder = folder; 
	}
	@Override
	public List<JavaClass> getJavaClassList(IDiffStrategy diffStrategy) {
		ClassResolver classResolver = new ClassResolver(folder);
		List<JavaClass> result = new ArrayList<JavaClass>();
		result.addAll(classResolver.getClassMetadata());
		return result;
	}
	public String getPath() {
		return folder.getAbsolutePath();
	}
}
